import { _decorator, Component, find, Node, Vec2 } from 'cc';
import { Ball } from './Ball';
const { ccclass, property } = _decorator;

@ccclass('ClickStart')
export class ClickStart extends Component {
    start() {
        this.node.on(Node.EventType.TOUCH_START,this.touchStart,this)
    }

    touchStart(e){
        find('Canvas/Slider/Ball').getComponent(Ball).firstBall(new Vec2(0,30))
        this.node.destroy()
    }

    update(deltaTime: number) {
        
    }
}


